package nc.ui.trade.business;

import java.util.ArrayList;

import nc.bs.framework.common.NCLocator;
import nc.bs.framework.exception.ComponentException;
import nc.bs.logging.Logger;
import nc.itf.uif.pub.IUifService;
import nc.uif.pub.exception.UifException;
import nc.vo.logging.Debug;
import nc.vo.pub.AggregatedValueObject;
import nc.vo.pub.CircularlyAccessibleValueObject;
import nc.vo.pub.SuperVO;
import nc.vo.pub.billcodemanage.BillCodeObjValueVO;
import nc.vo.trade.billsource.LightBillVO;


/**
 * business service ejb wrapper 
 * Created by EJBGenerator
 * based on velocity technology
 */

public class HYPubBO_Client 
{
   

	private static IUifService service;

	/**
	 * @return Returns the service.
	 */
	public static IUifService getService() throws UifException {
		if (service == null) {
			try {
				service = (IUifService) NCLocator.getInstance().lookup(
						IUifService.class.getName());
			} catch (ComponentException e) {
				Debug.debug("can't find " + e.getComponentName(), e);
				throw new UifException();
			}
		}
		return service;

	}
	/**
	 * @param billVo
	 * @throws UifException
	 */
	public static void checkConsistence(AggregatedValueObject billVo)
			throws UifException {
		getService().checkConsistence(billVo);
	}
	/**
	 * @param billVo
	 * @return
	 * @throws UifException
	 */
	public static ArrayList commitBill(AggregatedValueObject billVo)
			throws UifException {
		return getService().commitBill(billVo);
	}
	/**
	 * @param vo
	 * @throws UifException
	 */
	public static void delete(SuperVO vo) throws UifException {
		getService().delete(vo);
	}
	/**
	 * @param billVo
	 * @param userObj
	 * @return
	 * @throws UifException
	 */
	public static AggregatedValueObject deleteBD(AggregatedValueObject billVo,
			Object userObj) throws UifException {
		return getService().deleteBD(billVo, userObj);
	}
	/**
	 * @param billVo
	 * @return
	 * @throws UifException
	 */
	public static AggregatedValueObject deleteBill(AggregatedValueObject billVo)
			throws UifException {
		return getService().deleteBill(billVo);
	}
	/**
	 * @param c
	 * @param where
	 * @throws UifException
	 */
	public static void deleteByWhereClause(Class c, String where)
			throws UifException {
		getService().deleteByWhereClause(c, where);
	}
	/**
	 * @param tablename
	 * @param fieldname
	 * @param strwhere
	 * @return
	 * @throws java.rmi.UifException
	 */
	public static Object findColValue(String tablename, String fieldname,
			String strwhere) throws UifException {
		return getService().findColValue(tablename, fieldname, strwhere);
	}
	/**
	 * @param year_quarter
	 * @return
	 * @throws UifException
	 */
	public static String[] getAllPeriodByQuarter(String year_quarter)
			throws UifException {
		return getService().getAllPeriodByQuarter(year_quarter);
	}
	/**
	 * @param begin_year_quarter
	 * @param end_year_quarter
	 * @return
	 * @throws UifException
	 */
	public static String[] getAllPeriodByQuarter(String begin_year_quarter,
			String end_year_quarter) throws UifException {
		return getService().getAllPeriodByQuarter(begin_year_quarter,
				end_year_quarter);
	}
	/**
	 * @param year_quarter
	 * @return
	 * @throws UifException
	 */
	public static String[] getAllPeriodByYear(String year_quarter)
			throws UifException {
		return getService().getAllPeriodByYear(year_quarter);
	}
	/**
	 * @param beginYear
	 * @param endYear
	 * @return
	 * @throws UifException
	 */
	public static String[] getAllPeriodByYear(String beginYear, String endYear)
			throws UifException {
		return getService().getAllPeriodByYear(beginYear, endYear);
	}
	/**
	 * @param year
	 * @return
	 * @throws UifException
	 */
	public static String[] getAllQuarterByYear(String year) throws UifException {
		return getService().getAllQuarterByYear(year);
	}
	/**
	 * @param beginYear
	 * @param endYear
	 * @return
	 * @throws UifException
	 */
	public static String[] getAllQuarterByYear(String beginYear, String endYear)
			throws UifException {
		return getService().getAllQuarterByYear(beginYear, endYear);
	}
	/**
	 * @param billtype
	 * @param pk_corp
	 * @param vo
	 * @param intNum
	 * @return
	 * @throws java.rmi.UifException
	 */
	public static String[] getBatchBillNo(String billtype, String pk_corp,
			BillCodeObjValueVO vo, int intNum) throws UifException {
		return getService().getBatchBillNo(billtype, pk_corp, vo, intNum);
	}
	/**
	 * @param billtype
	 * @param pk_corp
	 * @param custBillCode
	 * @param vo
	 * @return
	 * @throws java.rmi.UifException
	 */
	public static String getBillNo(String billtype, String pk_corp,
			String custBillCode, BillCodeObjValueVO vo) throws UifException {
		return getService().getBillNo(billtype, pk_corp, custBillCode, vo);
	}
	/**
	 * @param beginPeriod
	 * @param endPeriod
	 * @return
	 * @throws UifException
	 */
	public static String[] getMiddlePeriod(String beginPeriod, String endPeriod)
			throws UifException {
		return getService().getMiddlePeriod(beginPeriod, endPeriod);
	}
	/**
	 * @param beginQuarter
	 * @param endQuarter
	 * @return
	 * @throws UifException
	 */
	public static String[] getMiddleQuarter(String beginQuarter, String endQuarter)
			throws UifException {
		return getService().getMiddleQuarter(beginQuarter, endQuarter);
	}
	/**
	 * @param beginYear
	 * @param endYear
	 * @return
	 * @throws UifException
	 */
	public static String[] getMiddleYear(String beginYear, String endYear)
			throws UifException {
		return getService().getMiddleYear(beginYear, endYear);
	}
	/**
	 * @param year
	 * @param month
	 * @return
	 * @throws UifException
	 */
	public static String[] getPreMonth(String year, String month)
			throws UifException {
		return getService().getPreMonth(year, month);
	}
	/**
	 * @param year_period
	 * @return
	 * @throws UifException
	 */
	public static String getQuarterByPeriod(String year_period) throws UifException {
		return getService().getQuarterByPeriod(year_period);
	}

	/**
	 * @param vo
	 * @return
	 * @throws UifException
	 */
	public static String insert(SuperVO vo) throws UifException {
		return getService().insert(vo);
	}
	/**
	 * @param vo
	 * @return
	 * @throws UifException
	 */
	public static String[] insertAry(SuperVO[] vo) throws UifException {
		return getService().insertAry(vo);
	}
	/**
	 * @param voClass
	 * @return
	 * @throws UifException
	 */
	public static SuperVO[] queryAll(Class voClass) throws UifException {
		return getService().queryAll(voClass);
	}
	/**
	 * @param strBillType
	 * @param c
	 * @param key
	 * @param strWhere
	 * @return
	 * @throws UifException
	 */
	public static CircularlyAccessibleValueObject[] queryAllBodyData(
			String strBillType, Class c, String key, String strWhere)
			throws UifException {
		return getService().queryAllBodyData(strBillType, c, key, strWhere);
	}
	/**
	 * @param billFinderClassName
	 * @param id
	 * @param type
	 * @return
	 * @throws UifException
	 */
	public static LightBillVO queryBillGraph(String billFinderClassName, String id,
			String type) throws UifException {
		return getService().queryBillGraph(billFinderClassName, id, type);
	}
	/**
	 * @param userObj
	 * @param strWhere
	 * @return
	 * @throws UifException
	 */
	public static AggregatedValueObject[] queryBillVOByCondition(Object userObj,
			String strWhere) throws UifException {
		return getService().queryBillVOByCondition(userObj, strWhere);
	}
	/**
	 * @param userObj
	 * @param parentPK
	 * @return
	 * @throws UifException
	 */
	public static AggregatedValueObject queryBillVOByPrimaryKey(Object userObj,
			String parentPK) throws UifException {
		return getService().queryBillVOByPrimaryKey(userObj, parentPK);
	}
	/**
	 * @param voClass
	 * @param strWhere
	 * @return
	 * @throws UifException
	 */
	public static SuperVO[] queryByCondition(Class voClass, String strWhere)
			throws UifException {
		return getService().queryByCondition(voClass, strWhere);
	}
	/**
	 * @param voClass
	 * @param pk
	 * @return
	 * @throws UifException
	 */
	public static SuperVO queryByPrimaryKey(Class voClass, String pk)
			throws UifException {
		return getService().queryByPrimaryKey(voClass, pk);
	}
	/**
	 * @param objNames
	 * @param pk_corp
	 * @return
	 * @throws java.rmi.UifException
	 */
	public static ArrayList queryDefVO(String[] objNames, String pk_corp)
			throws UifException {
		return getService().queryDefVO(objNames, pk_corp);
	}
	/**
	 * @param billVo
	 * @param userObj
	 * @return
	 * @throws UifException
	 */
	public static AggregatedValueObject saveBD(AggregatedValueObject billVo,
			Object userObj) throws UifException {
		return getService().saveBD(billVo, userObj);
	}
	/**
	 * @param billVos
	 * @param userObj
	 * @return
	 * @throws UifException
	 */
	public static AggregatedValueObject[] saveBDs(AggregatedValueObject[] billVos,
			Object userObj) throws UifException {
		return getService().saveBDs(billVos, userObj);
	}
	/**
	 * @param billVo
	 * @return
	 * @throws UifException
	 */
	public static AggregatedValueObject saveBill(AggregatedValueObject billVo)
			throws UifException {
		return getService().saveBill(billVo);
	}
	/**
	 * @param billVo
	 * @return
	 * @throws UifException
	 */
	public static AggregatedValueObject setBillTs(AggregatedValueObject billVo)
			throws UifException {
		return getService().setBillTs(billVo);
	}

	/**
	 * @param vo
	 * @throws UifException
	 */
	public static void update(SuperVO vo) throws UifException {
		getService().update(vo);
	}
	/**
	 * @param vo
	 * @throws UifException
	 */
	public static void updateAry(SuperVO[] vo) throws UifException {
		getService().updateAry(vo);
	}

}